var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/index.ts
var src_exports = {};
__export(src_exports, {
  default: () => src_default
});
module.exports = __toCommonJS(src_exports);
var import_eslint_webpack_plugin = __toESM(require("eslint-webpack-plugin"));
var import_stylelint_webpack_plugin = __toESM(require("stylelint-webpack-plugin"));
var import_commit_lint = __toESM(require("./cmd/commit-lint"));
var import_eslint = __toESM(require("./cmd/eslint"));
var import_lint = __toESM(require("./cmd/lint"));
var import_lint_staged = __toESM(require("./cmd/lint-staged"));
var import_prettier = __toESM(require("./cmd/prettier"));
var import_style_lint = __toESM(require("./cmd/style-lint"));
var import_use_lint = __toESM(require("./cmd/use-lint"));
var src_default = (api) => {
  api.describe({
    key: "szlint",
    config: {
      schema: (joi) => {
        return joi.object({
          eslint: joi.boolean(),
          stylelint: joi.boolean()
        });
      }
    },
    enableBy: api.EnableBy.config
  });
  api.chainWebpack((config) => {
    const cwd = api.paths.cwd;
    const { szlint } = api.userConfig;
    if (szlint && szlint.eslint) {
      config.plugin("eslint").use(import_eslint_webpack_plugin.default, [
        {
          context: cwd,
          extensions: ["js", "jsx", "ts", "tsx"]
        }
      ]);
    }
    if (szlint && szlint.stylelint) {
      config.plugin("stylelint").use(import_stylelint_webpack_plugin.default, [
        {
          context: cwd
        }
      ]);
    }
    return config;
  });
  (0, import_use_lint.default)(api);
  (0, import_eslint.default)(api);
  (0, import_style_lint.default)(api);
  (0, import_prettier.default)(api);
  (0, import_lint.default)(api);
  (0, import_lint_staged.default)(api);
  (0, import_commit_lint.default)(api);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
